package com.mofum.msdom.excel.constant;

import com.mofum.msdom.excel.converter.ExcelConverter;
import com.mofum.msdom.excel.converter.TypeConverter;
import com.mofum.msdom.excel.converter.impl.excel.StringExcelConvert;
import com.mofum.msdom.excel.converter.impl.javatype.StringConvert;
import com.mofum.msdom.excel.filter.DataFilter;
import com.mofum.msdom.excel.validator.Validator;

/**
 * Excel配置
 *
 * @author yuyang@qxy37.com
 * @since 2019/1/25 0025 12:53
 */
public class ExcelConfig {

    /**
     * 默认Excel配置
     */
    public static final ExcelConfig DEFAULT_EXCEL_CONFIG = buildExcelConfig();

    private static ExcelConfig buildExcelConfig() {
        ExcelConfig config = new ExcelConfig();
        config.converter = StringConvert.class;
        config.excelConverter = StringExcelConvert.class;
        config.validator = null;
        config.filter = null;
        return config;
    }


    /**
     * JavaType转换器
     */
    private Class<? extends TypeConverter> converter;

    /**
     * Excel转换器
     */
    private Class<? extends ExcelConverter> excelConverter;

    /**
     * 验证器
     */
    private Class<Validator> validator;

    /**
     * 过滤器
     */
    private Class<DataFilter> filter;

    public Class<? extends TypeConverter> getConverter() {
        return converter;
    }

    public void setConverter(Class<? extends TypeConverter> converter) {
        this.converter = converter;
    }

    public Class<? extends ExcelConverter> getExcelConverter() {
        return excelConverter;
    }

    public void setExcelConverter(Class<? extends ExcelConverter> excelConverter) {
        this.excelConverter = excelConverter;
    }

    public Class<Validator> getValidator() {
        return validator;
    }

    public void setValidator(Class<Validator> validator) {
        this.validator = validator;
    }

    public Class<DataFilter> getFilter() {
        return filter;
    }

    public void setFilter(Class<DataFilter> filter) {
        this.filter = filter;
    }
}
